package com.huishu.tcm.util.exception;

/**
 * 全局异常枚举
 */
public enum TcmExceptionEnum {
    /**
     * 用户帐号相关
     */
    USER_NOT_LOGIN(900, "未登录"),
    USER_WRONG_ACCOUNT_PASSWORD(901, "账号或密码错误"),
    USER_ACCOUN_NO_AUTHORITY(902, "没有操作权限"),
    USER_ACCOUNT_NOT_EXIST(903, "帐号不存在"),
    USER_PASSWORD_INVALID_FORMAT(909, "密码格式为8-16位字母数字下划线组合"),
    USER_WRONG_VERIFICATION_CODE(914, "验证码不正确"),
    /**
     * 数据相关
     */
    DATA_NOT_EXISTS(904, "数据不存在"),
    DATA_ALREADY_EXISTS(905, "数据已存在"),
    DATA_FIELD_VALUE_IS_INCORRECT(906, "数据字段值不正确"),
    /**
     * 服务相关
     */
    SERVICE_UNAVAILABLE(907, "服务不可用"),
    SERVICE_TOO_MANY_REQUESTS(908, "服务请求过多，请稍后再试"),
    /**
     * excel文件相关
     */
    EXCEL_INCORRECT_FORMAT(911, "导入失败，excel数据格式不正确。"),

    /**
     * oss相关
     */
    OSS_UPLOAD_ERROR(912,"文件上传异常"),

    /**
     * 短信相关
     */
    SMS_SEND_ERROR(913,"发送短信验证码异常");

    private Integer code;
    private String msg;

    TcmExceptionEnum(Integer code, String msg){
        this.code = code;
        this.msg = msg;
    }
    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
